#ifndef _MPU60501_H_
#define _MPU60501_H_

#define EMPL_TARGET_STM32F4
#define MPU6050


#define OK  0
#define ERR 1


typedef struct  mpu6050{
    unsigned long pedometer;
    float ouler[3];
    short acc[3];
    short gryo[3];
}mpu6050_t;

extern unsigned short acc_sens;
extern float gyro_sens;


void mpu6050_Init(void);
unsigned char mpu6050_update(void);
void mpu6050_read(mpu6050_t  *mpu_dat);
void mpu6050_reg_tab_cb(void (*func)(unsigned char, unsigned char));
void mpu_set_pedometer_step_count(unsigned long count);

int Sensors_I2C_ReadRegister(unsigned char slave_addr, unsigned char reg_addr, unsigned short len, unsigned char *data_ptr);
int Sensors_I2C_WriteRegister(unsigned char slave_addr, unsigned char reg_addr,unsigned short len,const unsigned char *data_ptr);
void log_debug(char *format, ...);
#endif
